package study.javaee.practice.service;

import study.javaee.practice.entity.User;

import javax.servlet.http.HttpServletRequest;

public interface AuthService {
    /**
     * 生成图形验证码保存到缓存中
     * @return Base64编码后的验证码图片
     */

    String requestImgLoginVerCode(HttpServletRequest request);
    /**
     * 生成邮箱验证码并发送
     * @param email
     */
    void requestLoginEmailVerCode(String email);

    void requestRegisterEmailVerCode(String email);

    void requestFindPwdEmailVerCode(String email);

    User logIn(String email, String password, String verCode,HttpServletRequest request);

    User logIn(String email, String password, String verCode, HttpServletRequest request, boolean remember);

    void register(User user, String verCode);

    void logout(HttpServletRequest request);

    void findUserPassword(String email, String password, String code);
}
